package util;

import java.math.BigDecimal;

public class CalculateMemLevel {
	public static int calculateMemLevel(BigDecimal points) {
		if (points.compareTo(new BigDecimal("101")) < 0) {
			return 0;
		} else if (points.compareTo(new BigDecimal("1001")) < 0) {
			return 1;
		} else if (points.compareTo(new BigDecimal("10001")) < 0) {
			return 2;
		} else if (points.compareTo(new BigDecimal("100001")) < 0) {
			return 3;
		} else {
			return 4;
		}
	}
}
